<template>
  <section>
    <el-card shadow="never" class="cardBox">
      <div slot="header" class="clearfix">
        <span>订单基础信息</span>
      </div>
      <el-form style="background-color: rgba(7, 123, 232, 0.05);" label-width="150px">
        <el-row type="flex" justify="space-between">
          <el-col :span="8">
            <el-form-item label="订单编号：">{{data.order_no}}</el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="交易方式：">{{data.type}}</el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="发布时间：">{{data.show_time}}</el-form-item>
          </el-col>
           </el-row>
           <el-row>
          <el-col :span="8">
            <el-form-item label="区块链交易ID：">{{data.txid}}</el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="支付方式：">{{无}}</el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="订单状态：">{{data.status === 'done' ? '已完成' : scope.row.status === 'need_verify' ? '待确认' : '已取消'}}</el-form-item>
          </el-col>
        </el-row>
      </el-form>
    </el-card>
  </section>
</template>
<script lang='ts'>
import { Vue, Component, Watch, Prop } from "vue-property-decorator";
import BaseSlot from "@/components/BaseSlot.vue";
import Constant from "@/lib/Constant";

@Component
export default class MyApplication extends Vue {
  @Prop()
  protected data: any = {
    order_no: '',
    offer_type: '',
    status: '',
    type: '',
    txid: '',
    show_time: '',
    created_at: ''
  };
  @Watch('data', {deep: true})
  protected init() {
    this.$set(this.data, 'show_time', Vue.prototype.$fmtDate(this.data.created_at));
  }
}
</script>

<style lang="scss" scoped>
/deep/ .cardBox {
  .el-form-item {
    margin-bottom: 0;
  }
}
</style>


